package com.example.springcloud.service;

import com.example.springcloud.entities.CommonResult;
import feign.Param;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
@RequestMapping("/payment")
public interface PaymentFeignService {
    @GetMapping("{id}")
    CommonResult getPayment(@PathVariable(value = "id") Long id);

    @GetMapping("/feign/timeout")
    String timeoutTest();
}
